import request from "@/utils/request";

// 获得从业人员列表
export function getPersonnelList(data) {
  return request({
    url: "/portal/personnel/page",
    method: "get",
    params:data,
  });
}

// 新增从业人员
export function createPersonnel(data) {
  return request({
    url: "/portal/personnel/create",
    method: "post",
    data,
  });
}

// 修改从业人员
export function updatePersonnel(data) {
  return request({
    url: "/portal/personnel/update",
    method: "post",
    data,
  });
}

// 从业人员详情
export function detailsPersonnel(id) {
  return request({
    url: "portal/personnel/get?id=" + id,
    method: "get",
  });
}

// 删除从业人员
export function delPersonnel(id) {
  return request({
    url: "portal/personnel/delete?id=" + id,
    method: "get",
  });
}

// 导出从业人员
export function exportPersonnel(data) {
  return request({
    url: "portal/personnel/export-excel",
    method: "get",
    responseType: 'blob'
  });
}
